<?php
 defined('RUN')or die('No access');class Config{private static $a=array();public static function loadFile($b){$c=CONFIGS_PATH.strtolower($b).EXT;if(is_readable($c)){$d=include $c;if(is_array($d)){self::$a=array_merge(self::$a,$d);return TRUE;}}return FALSE;}public static function loadDatabase($e,$f,$g){$h=Db::query("SELECT `{$f}`, `{$g}` FROM `{$e}`");if($h){foreach($h as $i){self::$a[$i[$f]]=$i[$g];}return TRUE;}return FALSE;}public static function get($j){if(self::has($j)){return self::$a[$j];}return NULL;}public static function has($j){return array_key_exists($j,self::$a);}public static function remove($j){if(self::has($j)){unset(self::$a[$j]);return TRUE;}return FALSE;}public static function set($j,$k,$l=TRUE){if(!self::has($j)||$l){self::$a[$j]=$k;}}}